import type { App } from "vue";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";

const store = createPinia();
store.use(piniaPluginPersistedstate);
// 全局注册 store
export const setupStore = (app: App<Element>) => {
  app.use(store);
};

export * from "./modules/useUserStore.ts";
export * from "./modules/useMessageAddStore.ts";
export * from "./modules/usePrivateMessageStore.ts";

export { store };
